﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using QLQTPM_ThuDuc_Group7.BUS;

namespace DesignLayOut_QLQTPM_Team7
{
    public partial class ThongBao : Form
    {
        public ThongBao()
        {
            InitializeComponent();
        }
        public int matendiadiem;
        private void btnHuy_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnDongY_Click(object sender, EventArgs e)
        {
            bool kt = TenDiaDiemBUS.KiemTraTonTai(matendiadiem);
            if (kt == true)
            {
                bool kq = DiaDiemBUS.Delete(matendiadiem);
                if (kq)
                {
                    MessageBox.Show("Xoa thanh cong dia diem!");
                    this.Close();
               
                }
                else
                    MessageBox.Show("Xoa dia diem that bai!");
            }
            else
                MessageBox.Show("Ma ten dia diem can xoa khong ton tai!");
        }

        private void ThongBao_Load(object sender, EventArgs e)
        {
            Form1 frm1 = new Form1();
        }
    }
}
